<template>
  <div>
    <el-tabs type="border-card">
      <el-tab-pane label="查看线路类型">
        <el-table
            :data="lineType"
            border
            style="width: 100%">
          <el-table-column
              type="index"
              label="序号"
              fixed
              width="150">
          </el-table-column>
          <el-table-column
              fixed prop="typeName" label="线路名称" width="150">
          </el-table-column>
        </el-table>
      </el-tab-pane>
      <el-tab-pane label="添加线路类型">
        <el-form ref="form"  :model="putLintType" label-width="150px">
          <el-form-item label="线路类型名称">
            <el-input v-model="putLintType.typeName"></el-input>
          </el-form-item>
          <el-form-item label="线路类型图标">

<!--            <i v-for="icon in iconList" :class="icon" :key="icon"></i>-->

          </el-form-item>
        </el-form>
      </el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
export default {
  name: "adminLinetype",
  data(){
    return{
      iconList: [
          {value:1,label:'el-icon-s-promotion'},
          {value:2,label: 'el-icon-s-home'},
          {value:3,label:'el-icon-s-ticket'},
          {value:4,label:'el-icon-s-management'},
          {value:5,label:'el-icon-s-open'},
      ],
      lineType:[],
      putLintType:{},
      imgSrc:''
    }
  },
  created() {
    this.getLineType()

  },

  methods:{
    getLineType:function(){
      this.$axios.get("/api/admin/lineType").then(res => {
       this.lineType = res.data
      })
    },
    // onSuccess(res) {
    //   this.imgSrc = this.$axios.defaults.baseURL + res.data.url;
    //   console.log(res);
    // }
  },
}
</script>

<style scoped>

</style>